#ifndef PlaceObject2_H
#define PlaceObject2_H

#include "PlayListTag.h"
#include "Matrix.h"
namespace swfstream {
class PlaceObject2: public PlayListTag {
public:
	bool PlaceFlagHasClipActions; ///< UB[1] SWF 5 or later: has clip actions (sprite characters only).Otherwise: always 0.
	bool PlaceFlagHasClipDepth; ///< UB[1] Has clip depth.
	bool PlaceFlagHasName; ///< UB[1] Has name.
	bool PlaceFlagHasRatio; ///< UB[1] Has ratio.
	bool PlaceFlagHasColorTransform; ///< UB[1] Has color transform.
	bool PlaceFlagHasMatrix; ///< UB[1] Has matrix.
	bool PlaceFlagHasCharacter; ///< UB[1] Places a character.
	bool PlaceFlagMove; ///< UB[1] Defines a character to be moved.
	uint16 depth; ///< UI16 Depth of character.
	uint16 characterId; ///< If PlaceFlagHasCharacter UI16 ID of character to place.
	Matrix* matrix; ///< If PlaceFlagHasMatrix MATRIX Transform matrix data.
	//ColorTransform If PlaceFlagHasColorTransform CXFORMWITHALPHA Color transform data.
	uint16 ratio; ///< If PlaceFlagHasRatio UI16
	//Name If PlaceFlagHasName STRING Name of character.
	uint16 ClipDepth; ///< If PlaceFlagHasClipDepth UI16 Clip depth(see Clipping layers).
	//ClipActions If PlaceFlagHasClipActions CLIPACTIONS SWF 5 or later:Clip Actions Data.
	void print();
	static PlaceObject2* from_file(FILE* f);
	virtual TiXmlElement* toTiXmlElement();
};
}
#endif
